#!/bin/bash
ps -Leo pid,1wp,user,pcpu,pmem,cmd >/tmp/pthreads.log
echo "ps -Leo pid,1wp,user,pcpu,pmem,cmd >/tmp/pthreads.log">
/tmp/pthreads.log
echo `date`>>/tmp/pthreads.log
echo 1
pid=`ps aux|grep tomcat|grep cwh|awk -F '' '(print $2)'`
echo 2
echo "pstack &pid >>/tmp/pstack.log">>/tmp/pstack.log
pstack &pid >>/tmp/pstack.log
echo `date` >/tmp/pstack.log
echo 3
echo "lsof >>/tmp/sys-o-files.log">>/tmp/sys-o-files.log
lsof >>/tmp/sys-o-files.log
echo`date` >/tmp/sys-o-files.log